import { HttpGet, HttpPost } from '@/api/index.js'

/**
 * 新增
 * @param data
 */
export const add = (data) => {
    return HttpPost('/admin/erp/supplier/add', data)
}

/**
 * 更新
 * @param data
 */
export const update = (data) => {
    return HttpPost('/admin/erp/supplier/update', data)
}

/**
 * 详情
 * @param id
 */
export const detail = (id) => {
    return HttpGet('/admin/erp/supplier/detail', {id})
}

/**
 * 分页查询
 * @param data
 */
export const pageList = (data) => {
    return HttpGet('/admin/erp/supplier/pageList', data)
}

/**
 * 通过ID删除
 * @param id
 */
export const deleteById = (id) => {
    return HttpPost('/admin/erp/supplier/deleteById/' + id)
}
